Topological Learning Method and Apparatus for OPENFLOW Network Cross Conventional IP Network

ABSTRACT

A topological learning method and apparatus for an OPENFLOW network cross a conventional Internet Protocol (IP) network. The method includes obtaining, by a controller, M OPENFLOW switch (OFS) ports connected to a same conventional IP network, determining whether there is a logical switch corresponding to the conventional IP network, if the controller determines that there is no logical switch corresponding to the conventional IP network, creating and storing the information about the logical switch, where the information about the logical switch includes related information of the M OFS ports, and related information of each OFS port includes link information in a direction from the port to the logical switch and/or link information in a direction from the logical switch to the port, and managing, by the controller, the logical switch as a common OPENFLOW switch of an OPENFLOW network.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2014/096052, filed on Dec. 31, 2014, the disclosure of which ishereby incorporated by reference in its entirety.

TECHNICAL FIELD

Embodiments of the present disclosure relate to communicationstechnologies, and in particular, to a topological learning method andapparatus for an OPENFLOW network cross a conventional Internet Protocol(IP) network.

BACKGROUND

An OPENFLOW network includes a controller and multiple OPENFLOW switches(OFS), and one controller manages multiple OFSs. For example, acontroller formulates, based on a view of an entire network, a routingpolicy for an OFS, and the OFS performs data forwarding and processingaccording to the routing policy sent by the controller. In comparisonwith an existing conventional IP network, the OPENFLOW network hasadvantages such as easy to manage and easy to maintain. However,considering costs, currently, OPENFLOW networks are mainly deployedinside a data center in a concentrated manner, and work collaborativelywith the conventional IP network by means of interconnection.

In networking in which an OPENFLOW network and a conventional IP networkare interconnected, a controller cannot perform topological learningthat is between OFSs in the OPENFLOW network through the conventional IPnetwork. Therefore, generally, configuration of a topology of theOPENFLOW network cross the conventional IP network is completedmanually. However, topological learning efficiency of the OPENFLOWnetwork cross the conventional IP network is not high.

SUMMARY

Embodiments of the present disclosure provide a topological learningmethod and apparatus for an OPENFLOW network cross a conventional IPnetwork to improve topological learning efficiency of an OPENFLOWnetwork cross a conventional IP network.

According to a first aspect, an embodiment of the present disclosureprovides a topological learning method for an OPENFLOW network cross aconventional IP network, including obtaining, by a controller, MOPENFLOW switch OFS ports connected to a same conventional IP network,where M is an integer greater than or equal to 2, the conventional IPnetwork includes a non-OFS, and the conventional IP network does notinclude an OFS, determining, by the controller, whether there is alogical switch corresponding to the conventional IP network, whereinformation about the logical switch includes related information of atleast one OFS port among the M OFS ports, and if the controllerdetermines that there is no logical switch corresponding to theconventional IP network, creating and storing the information about thelogical switch, where the information about the logical switch includesrelated information of the M OFS ports, where related information ofeach OFS port includes link information in a direction from the port tothe logical switch and/or link information in a direction from thelogical switch to the port.

With reference to the first aspect, in a first possible implementationmanner of the first aspect, the method further includes if thecontroller determines that there is a logical switch corresponding tothe conventional IP network, updating the information about the logicalswitch, where the updated information about the logical switch includesthe related information of the M OFS ports.

With reference to the first aspect, in a second possible implementationmanner of the first aspect, the creating and storing the informationabout the logical switch includes creating and storing, by thecontroller, link information between the M OFS ports and the logicalswitch according to sending directions and receiving directions of the MOFS ports.

With reference to the first aspect or the first possible implementationmanner or the second possible implementation manner of the first aspect,in a third possible implementation manner of the first aspect, theobtaining, by a controller, M OFS ports connected to a same conventionalIP network includes controlling, by the controller, each OFS port in theOPENFLOW network to send a Link Layer Discovery Protocol (LLDP) messageand a Broadcast Domain Discovery Protocol (BDDP) message, where the BDDPmessage and the LLDP message each carry an identifier of a sending port,and the identifier of the sending port can uniquely identify the sendingport in the OPENFLOW network, and obtaining, by the controller, the MOFS ports connected to the same conventional IP network according to theidentifier of the sending port that is carried in the BDDP message andthe identifier of the sending port that is carried in the LLDP message,where the M OFS ports include a first port and M−1 second ports, and thefirst port receives BDDP messages sent by the second ports but does notreceive LLDP messages sent by the second ports, or the M−1 second portsreceive a BDDP message sent by the first port but do not receive an LLDPmessage sent by the first port.

With reference to the first aspect or the first possible implementationmanner or the second possible implementation manner of the first aspect,in a fourth possible implementation manner of the first aspect, theobtaining, by a controller, M OFS ports connected to a same conventionalIP network includes enabling, by the controller, a routing protocol on athird port connected to an IP router, and storing a correspondencebetween the third port and an IP address, learning, by the controllerusing the routing protocol, routing information of the IP routerconnected to the third port, obtaining, by the controller from therouting information, network segment information of routers connected tothe IP router, determining, by the controller according to thecorrespondence between the third port and the IP address, a fourth portbelonging to the network segment information, sending, by thecontroller, a User Datagram Protocol (UDP) message to the fourth portthrough the third port, where the UDP message includes a data pathidentifier and a port identifier of a switch that sends the UDP message,and if the controller determines that the fourth port receives the UDPmessage sent by the third port, determining that the third port and thefourth port are ports in the M OFS ports connected to the sameconventional IP network.

With reference to any one of the first aspect or the first possibleimplementation manner to the third possible implementation manner of thefirst aspect, in a fifth possible implementation manner of the firstaspect, after the creating and storing, by the controller, theinformation about the logical switch, the method further includes whenthe controller determines that there is a down port among the M OFSports, deleting link information between the down port and the logicalswitch, or if the controller determines that all of the M OFS ports aredown, deleting the information about the logical switch.

With reference to the first aspect, in a sixth possible implementationmanner of the first aspect, after the creating and storing, by thecontroller, the information about the logical switch, the method furtherincludes calculating, by the controller, a forwarding path according tolink information between the M OFS ports and the logical switch, andwhen the logical switch is a first-hop switch on the forwarding path,using, by the controller, a second-hop switch on the forwarding path asthe first-hop switch, and sending a flow entry to a switch on theforwarding path other than the logical switch, or when the logicalswitch is an intermediate-hop switch on the forwarding path, sending, bythe controller, a flow entry to a switch on the forwarding path otherthan the logical switch, or when the logical switch is a last-hop switchon the forwarding path, using, by the controller, a penultimate-hopswitch on the forwarding path as the last-hop switch, and forwarding aflow entry to a switch on the forwarding path other than the logicalswitch.

According to a second aspect, an embodiment of the present disclosureprovides a topological learning apparatus for an OPENFLOW network crossa conventional IP network, where the topological learning apparatus foran OPENFLOW network cross a conventional IP network is deployed on acontroller, and the apparatus includes an obtaining module, configuredto obtain M OPENFLOW switch OFS ports connected to a same conventionalIP network, where M is an integer greater than or equal to 2, theconventional IP network includes a non-OFS, and the conventional IPnetwork does not include an OFS, a determining module, configured todetermine whether there is a logical switch corresponding to theconventional IP network, where information about the logical switchincludes related information of at least one OFS port among the M OFSports, and a processing module, configured to if the determining moduledetermines that there is no logical switch corresponding to theconventional IP network, create and store the information about thelogical switch, where the information about the logical switch includesrelated information of the M OFS ports, where related information ofeach OFS port includes link information in a direction from the port tothe logical switch and/or link information in a direction from thelogical switch to the port.

With reference to the second aspect, in a first possible implementationmanner of the second aspect, the processing module is further configuredto if there is a logical switch corresponding to the conventional IPnetwork, update the information about the logical switch, where theupdated information about the logical switch includes the relatedinformation of the M OFS ports.

With reference to the second aspect, in a second possible implementationmanner of the second aspect, the processing module is configured tocreate and store link information between the M OFS ports and thelogical switch according to sending directions and receiving directionsof the M OFS ports.

With reference to the second aspect or the first possible implementationmanner or the second possible implementation manner of the secondaspect, in a third possible implementation manner of the second aspect,the processing module is configured to control all OPENFLOW switch OFSports in the OPENFLOW network to send an LLDP message and a BDDPmessage, where the BDDP message and the LLDP message each carry anidentifier of a sending port, and the identifier of the sending port canuniquely identify the sending port in the OPENFLOW network, and obtainthe M OFS ports connected to the same conventional IP network accordingto the identifier of the sending port that is carried in the BDDPmessage and the identifier of the sending port that is carried in theLLDP message, where the M OFS ports include a first port and M−1 secondports, and the first port receives BDDP messages sent by the secondports but does not receive LLDP messages sent by the second ports, orthe M−1 second ports receive a BDDP message sent by the first port butdo not receive an LLDP message sent by the first port.

With reference to the second aspect or the first possible implementationmanner or the second possible implementation manner of the secondaspect, in a fourth possible implementation manner of the second aspect,the processing module is configured to enable a routing protocol on athird port connected to an IP router, and store a correspondence betweenthe third port and an IP address, learn, using the routing protocolrouting information of the IP router connected to the third port,obtain, from the routing information, network segment information ofrouters connected to the IP router, determine, according to thecorrespondence between the third port and the IP address, a fourth portbelonging to the network segment information, send a UDP message to thefourth port through the third port, where the UDP message includes adata path identifier and a port identifier of a switch that sends theUDP message, and if the fourth port receives the UDP message sent by thethird port, determine that the third port and the fourth port are portsin the M OFS ports connected to the same conventional IP network.

With reference to any one of the second aspect or the first possibleimplementation manner to the third possible implementation manner of thesecond aspect, in a fifth possible implementation manner of the secondaspect, the processing module is further configured to when there is adown port among the M OFS ports, delete link information between thedown port and the logical switch, or if all of the M OFS ports are down,delete the information about the logical switch.

With reference to the second aspect, in a sixth possible implementationmanner of the second aspect, the processing module is further configuredto calculate a forwarding path according to link information between theM OFS ports and the logical switch, and when the logical switch is afirst-hop switch on the forwarding path, use a second-hop switch on theforwarding path as the first-hop switch, and send a flow entry to aswitch on the forwarding path other than the logical switch, or when thelogical switch is an intermediate-hop switch on the forwarding path,send a flow entry to a switch on the forwarding path other than thelogical switch, or when the logical switch is a last-hop switch on theforwarding path, use a penultimate-hop switch on the forwarding path asthe last-hop switch, and forward a flow entry to a switch on theforwarding path other than the logical switch.

According to a third aspect, an embodiment of the present disclosureprovides a topological learning apparatus for an OPENFLOW network crossa conventional IP network, where the topological learning apparatus foran OPENFLOW network cross a conventional IP network is deployed on acontroller, and the apparatus includes a communications interface, amemory, a processor, and a communications bus, where the communicationsinterface, the memory, and the processor communicate using thecommunications bus, and the memory is configured to store a program, andthe processor is configured to execute the program stored in the memory,and when the topological learning apparatus for an OPENFLOW networkcross a conventional IP network operates, the processor runs theprogram, and the program includes obtaining M OFS ports connected to asame conventional IP network, where M is an integer greater than orequal to 2, the conventional IP network includes a non-OFS, and theconventional IP network does not include an OFS, determining whether thecontroller stores information about the logical switch, where theinformation about the logical switch includes related information of atleast one OFS port among the M OFS ports, and if the controller does notstore the information about the logical switch, creating and storing theinformation about the logical switch, where the information about thelogical switch includes related information of the M OFS ports, whererelated information of each OFS port includes link information in adirection from the port to the logical switch and/or link information ina direction from the logical switch to the port.

According to the topological learning method and apparatus for anOPENFLOW network cross a conventional IP network provided in theembodiments of the present disclosure, a controller obtains M OFS portsconnected to a same conventional IP network, and determines whetherthere is a logical switch corresponding to the conventional IP network,where information about the logical switch includes related informationof at least one OFS port among the M OFS ports, if the controllerdetermines that there is no logical switch corresponding to theconventional IP network, the controller creates and stores theinformation about the logical switch, where the information about thelogical switch includes related information of the M OFS ports, andrelated information of each OFS port includes link information in adirection from the port to the logical switch and/or link information ina direction from the logical switch to the port, and the controllermanages the logical switch as a common OPENFLOW switch of an OPENFLOWnetwork. This improves topological learning efficiency of an OPENFLOWnetwork cross a conventional IP network, and simplifies management by acontroller cross a networking scenario in which an OPENFLOW network anda conventional IP network are interconnected.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments. Theaccompanying drawings in the following description show merely someembodiments of the present disclosure, and persons of ordinary skill inthe art may still derive other drawings from these accompanying drawingswithout creative efforts.

FIG. 1 is a schematic flowchart of an embodiment of a topologicallearning method for an OPENFLOW network cross a conventional IP networkaccording to the present disclosure.

FIG. 2 is a schematic diagram of a first application scenario accordingto the present disclosure.

FIG. 3 is a schematic flowchart of an embodiment of a topologicallearning method for an OPENFLOW network cross a conventional IP networkaccording to the present disclosure.

FIG. 4 is a schematic diagram of a topological learning effect in afirst scenario according to the present disclosure.

FIG. 5 is a schematic diagram of a second application scenario accordingto the present disclosure,

FIG. 6 is a schematic flowchart of an embodiment of a topologicallearning method for an OPENFLOW network cross a conventional IP networkaccording to the present disclosure.

FIG. 7 is a schematic diagram of a third application scenario accordingto the present disclosure,

FIG. 8 is a schematic flowchart of an embodiment of a topologicallearning method for an OPENFLOW network cross a conventional IP networkaccording to the present disclosure.

FIG. 9 is a schematic diagram of a topological learning effect in athird scenario according to the present disclosure.

FIG. 10 is a schematic diagram of a scenario in which a logical switchis a first-hop switch according to the present disclosure.

FIG. 11 is a schematic diagram of a scenario in which a logical switchis an intermediate-hop switch according to the present disclosure.

FIG. 12 is a schematic diagram of a scenario in which a logical switchis a last-hop switch according to the present disclosure.

FIG. 13 is a schematic structural diagram of an embodiment a topologicallearning apparatus for an OPENFLOW network cross a conventional IPnetwork according to the present disclosure.

FIG. 14 is a schematic structural diagram of an embodiment of atopological learning apparatus for an OPENFLOW network cross aconventional IP network according to the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following describes the technical solutions in the embodiments ofthe present disclosure with reference to the accompanying drawings inthe embodiments of the present disclosure. The described embodiments aremerely some but not all of the embodiments of the present disclosure.All other embodiments obtained by persons of ordinary skill in the artbased on the embodiments of the present disclosure without creativeefforts shall fall within the protection scope of the presentdisclosure.

The present disclosure is mainly applied to a networking scenario inwhich an OPENFLOW network and a conventional IP network areinterconnected. The conventional IP network includes a non-OFS, and theconventional IP network does not include an OFS. In the OPENFLOWnetwork, a controller centrally manages and controls ports of all OFSs,however, in the conventional IP network, the controller cannot controlall switches of the conventional IP network. Therefore, the controllercannot learn a topological relationship among ports of the OPENFLOWnetwork through the conventional IP network. To resolve the foregoingproblems, in the present disclosure, the controller obtains M OFS portsconnected to a same conventional IP network, the controller determineswhether the controller stores information about a logical switch, wherethe information about the logical switch includes related information ofat least one OFS port among the M OFS ports, and if the controller doesnot store information about the logical switch, the controller createsand stores information about the logical switch, where the informationabout the logical switch includes related information of the M OFSports, and related information of each OFS port includes linkinformation in a direction from the port to the logical switch and/orlink information in a direction from the logical switch to the port.That is, a same conventional IP network is virtualized as a logicalswitch, a topological relationship of the OPENFLOW network cross theconventional IP network is learned by creating link information of eachOFS port and the logical switch, and the controller manages the logicalswitch as a common switch of the OPENFLOW network. For example, thecontroller maintains a link and topological information and participatesin calculation of a forwarding path, but does not deliver a flow entryto the logical switch. In this way, topological learning efficiency ofan OPENFLOW network cross a conventional IP network can be improved, andmanagement by a controller cross a networking scenario in which anOPENFLOW network and a conventional IP network are interconnected can besimplified.

Ports in each embodiment of the present disclosure refer to up ports ofan OFS, that is, effective ports.

The following describes in detail technical solutions in the presentdisclosure using specific embodiments. The following specificembodiments may be combined with one another, and for a same or similarconcept or process, details may not be described in some embodiments.

FIG. 1 is a schematic flowchart of an embodiment of a topologicallearning method for an OPENFLOW network cross a conventional IP networkaccording to the present disclosure. This embodiment is performed by acontroller of an OPENFLOW network. As shown in FIG. 1, the method ofthis embodiment is as follows:

-   -   S101: The controller obtains M OFS ports connected to a same        conventional IP network.

M is an integer greater than or equal to 2.

In different scenarios, the controller may obtain, in different manners,the M OFS ports connected to the same conventional IP network in theOPENFLOW network.

-   -   S102: The controller determines whether there is a logical        switch corresponding to the conventional IP network.

Information about the logical switch includes related information of atleast one OFS port among the M OFS ports. A conventional IP network isvirtualized as a logical switch.

Related information of each OFS port includes link information in adirection from the port to the logical switch and/or link information ina direction from the logical switch to the port.

If the controller determines that there is no logical switchcorresponding to the conventional IP network, S103 is performed, or ifthe controller determines that there is a logical switch correspondingto the conventional IP network, S104 is performed.

-   -   S103: The controller creates and stores information about the        logical switch.

The information about the logical switch includes related information ofthe M OFS ports.

-   -   S104: The controller updates information about the logical        switch.

The updated information about the logical switch includes the relatedinformation of the M OFS ports.

According to this embodiment, a controller obtains M OFS ports connectedto a same conventional IP network, and determines whether there is alogical switch corresponding to the conventional IP network, whereinformation about the logical switch includes related information of atleast one OFS port among the M OFS ports, if the controller determinesthat there is no logical switch corresponding to the conventional IPnetwork, the controller creates and stores the information about thelogical switch, where the information about the logical switch includesrelated information of the M OFS ports, and related information of eachOFS port includes link information in a direction from the port to thelogical switch and/or link information in a direction from the logicalswitch to the port, and the controller manages the logical switch as acommon OPENFLOW switch of an OPENFLOW network. This improves topologicallearning efficiency of an OPENFLOW network cross a conventional IPnetwork, and simplifies management by a controller cross a networkingscenario in which an OPENFLOW network and a conventional IP network areinterconnected.

The following describes the technical solutions in the presentdisclosure using different scenarios. Persons skilled in the art mayunderstand that when networking is a combination of the differentscenarios, the following technical solutions may be used adaptively incombination. When the networking is a combination of the differentscenarios, details are not described in the present disclosure.

FIG. 2 is a schematic diagram of a first application scenario accordingto the present disclosure. As shown in FIG. 2, a switch of an OPENFLOWnetwork is connected to a switch of a conventional IP network. For thescenario shown in FIG. 2, a method in the present disclosure is shown inFIG. 3. FIG. 3 is a schematic flowchart of an embodiment of atopological learning method for an OPENFLOW network cross a conventionalIP network according to the present disclosure. As shown in FIG. 3, themethod of this embodiment is as follows:

-   -   S301: A controller controls each OFS port in an OPENFLOW network        to send an LLDP message and a BDDP message.

The BDDP message and the LLDP message each carry an identifier of asending port, and the identifier of the sending port can uniquelyidentify the sending port in the OPENFLOW network. For example, theidentifier of the sending port may be an identifier of an OFS at whichthe sending port is located and a port number of the sending port. TheLLDP message can be transmitted between devices that are one hop awayfrom each other. After receiving the LLDP message, the switch of theconventional IP network does not further forward the message. However,the BDDP message is a broadcast message, and after receiving the BDDPmessage, the switch of the conventional IP network further forwards themessage.

-   -   S302: The controller obtains, according to an identifier of a        sending port that is carried in the BDDP message and an        identifier of a sending port that is carried in the LLDP        message, M OFS ports connected to a same conventional IP        network.

The M OFS ports include a first port and M−1 second ports, and the firstport receives BDDP messages sent by the second ports but does notreceive LLDP messages sent by the second ports, where M is an integergreater than or equal to 1. For example, if a port 1 of OFS-1 receives aBDDP message sent by a port 1 of OFS-2 but does not receive an LLDPmessage sent by the port 1 of OFS-2, and the port 1 of OFS-1 receives aBDDP message sent by a port 1 of OFS-3 but does not receive an LLDPmessage sent by the port 1 of OFS-3, the port 1 of OFS-1 is the firstport, and both the port 1 of OFS-2 and the port 1 of OFS-3 are thesecond ports. The port 1 of OFS-1, the port 1 of OFS-2, and the port 1of OFS-3 are three OFS ports connected to a same conventional IP network(a two-layer conventional IP network).

Alternatively, the M OFS ports include a first port and M−1 secondports, and the first port receives BDDP messages sent by the secondports but does not receive LLDP messages sent by the second ports, whereR is an integer greater than or equal to 1. For example, if a port 1 ofOFS-2 receives a BDDP message sent by a port 1 of OFS-1 but does notreceive an LLDP message sent by the port 1 of OFS-1, and a port 1 ofOFS-3 receives a BDDP message sent by the port 1 of OFS-1 but does notreceive an LLDP message sent by the port 1 of OFS-1, the port 1 of OFS-1is the first port, and both the port 1 of OFS-2 and the port 1 of OFS-3are the second ports. The port 1 of OFS-1, the port 1 of OFS-2, and theport 1 of OFS-3 are three OFS ports connected to a same conventional IPnetwork (a two-layer conventional IP network).

The first port described in this embodiment refers to that a port isreferred to as the first port when the port implements a function of areceiving port and satisfies the conditions described in the previousparagraph. The second port refers to that a port is referred to as thesecond port when the port implements a function of a sending port andsatisfies the conditions described in the previous paragraph. It may beunderstood that a same port may be the first port, or may be the secondport at the same time.

-   -   S303: The controller determines whether there is a logical        switch corresponding to the conventional IP network.

Information about the logical switch includes related information of atleast one OFS port among the M OFS ports.

If the controller determines that there is no logical switchcorresponding to the conventional IP network, S304 is performed, or ifthe controller determines that there is a logical switch correspondingto the conventional IP network, S305 is performed.

-   -   S304: The controller creates and stores information about the        logical switch.

Link information between the M OFS ports and the logical switch iscreated and stored according to sending directions and receivingdirections of the M OFS ports. In an embodiment, link information of areceiving direction of the first port and link information of a sendingdirection of the second port are created.

The information about the logical switch includes related information ofthe first port and related information of the second port. The relatedinformation of the first port includes link information in a directionfrom the logical switch to the first port, and the related informationof the second port includes link information in a direction from thesecond port to the logical switch.

-   -   S305: The controller updates information about the logical        switch.

The updated information about the logical switch includes relatedinformation of the M OFS ports.

In one embodiment, it is assumed that the logical switch includesrelated information of T OFS ports among the M OFS ports, and for this,there are cases as follows. When the T OFS ports include the first port,and the related information of the first port does not include the linkinformation in the direction from the logical switch to the first port,the link information in the direction from the logical switch to thefirst port is created. When the T OFS ports include the second port, andthe related information of the second port does not include the linkinformation in the direction from the second port to the logical switch,the link information in the direction from the second port to thelogical switch is created, and related information of ports among the MOFS ports except the T OFS ports is created and stored. For ports,belonging to the first port, of the ports among the M OFS ports exceptthe T OFS ports, the link information in the direction from the logicalswitch to the first port is created, and for ports belonging to thesecond port, the link information in the direction from the second portto the logical switch is created.

Using the method shown in FIG. 3, a topological relationship afterlearning in the scenario shown in FIG. 2 is shown in FIG. 4. FIG. 4 is aschematic diagram of a topological learning effect in a first scenarioaccording to the present disclosure.

Each logical switch maintains a table of mappings between ports of thelogical switch and ports of the OPENFLOW network, and manages linkinformation between the logical switch and each port of the OPENFLOWnetwork, as shown in Table 1.

TABLE 1 Link information relationship table maintained by a logicalswitch Number of Port number of an Management the logical OPENFLOWLogical switch port switch network Logical switch 1 SW1-Port1 1SW1-Port1 2 SW2-Port1 3 SW3-Port1 4 SW4-Port1

“SWi-Portj” represents a j^(th) OFS port of a switch i of the OPENFLOWnetwork.

A port, of the OPENFLOW network, that creates a logical switch isresponsible for managing the logical switch, and updates in real timelearned port information of the OPENFLOW network. When the port, of theOPENFLOW network, that is responsible for managing the logical switch isdown, a port is re-selected from other ports of the OPENFLOW networkconnected to the logical switch, to manage the logical switch. When allports of the OPENFLOW network that are connected to the logical switchare down, the logical switch is deleted. Alternatively, when thecontroller determines that there is a down port among the M ports in theforegoing embodiments, link information between the down port and thelogical switch is deleted. When the controller determines that all ofthe M OFS ports are down, the information about the logical switch isdeleted.

FIG. 5 is a schematic diagram of a second application scenario accordingto the present disclosure. As shown in FIG. 5, a switch of an OPENFLOWnetwork is connected to a router of a conventional IP network. For thescenario shown in FIG. 5, a method in the present disclosure is shown inFIG. 6. FIG. 6 is a schematic flowchart of an embodiment of atopological learning method for an OPENFLOW network cross a conventionalIP network according to the present disclosure. As shown in FIG. 6, themethod of this embodiment is as follows:

-   -   S601: A controller enables a routing protocol on a third port        connected to an IP router, and stores a correspondence between        the third port and an IP address.

The correspondence is shown in Table 2:

TABLE 2 Correspondence between a third port and an IP address Third portIP address SW1-Port1 10.0.10.2 SW2-Port1 10.0.20.2 SW3-Port1 10.0.30.2SW3-Port1 10.0.50.2 SW4-Port1 10.0.40.2

-   -   S602: The controller learns, using the routing protocol, routing        information of the IP router connected to the third port.

After the routing protocol is enabled on the third port connected to theIP router, the IP router sends the routing information learned by therouter to the third port.

-   -   S603: The controller obtains network segment information of        routers connected to the IP router from the routing information.

For example, a port 1 of a switch (SW)1 learns routing information ofnetwork segments 10.0.20.0/24 and 10.0.30.0/24.

-   -   S604: The controller determines a fourth port belonging to the        network segment information according to the correspondence        between the third port and the IP address.

For example, if an IP address of SW2-Port1 is 10.0.20.2 and belongs tothe network segment of 10.0.20.0/24, and an IP address of SW3-Port1 is10.0.30.2 and belongs to the network segment of 10.0.30.0/24, SW2-Port1and SW3-Port1 are fourth ports, and determining of other ports aresimilar thereto.

-   -   S605: The controller sends a UDP message to the fourth port        through the third port.

The UDP message carries an identifier of the third port, and theidentifier of the third port can uniquely identify the third port in theOPENFLOW network.

The UDP message includes a data path identifier and port information ofa switch that sends the message, and a purpose for sending the UDPmessage is to probe accessibility of a path between the third port andthe fourth port. For example, SW1-Port1 sends a UDP message to 10.0.20.2and 10.0.30.2 to probe accessibility of SW2-Port1 and accessibility ofSW3-Port1.

-   -   S606: If the controller determines that the fourth port receives        the UDP message sent by the third port, the controller        determines that the third port and the fourth port are M OFS        ports connected to a same conventional IP network.

For example, if SW2-Port1 and SW3-Port1 receive the UDP message sent bySW1-Port1, it indicates that SW1-Port1, SW2-Port1, and SW3-Port1 arethree OFS ports connected to the same conventional IP network (athree-layer conventional IP network).

-   -   S607: The controller determines whether there is a logical        switch corresponding to the conventional IP network.

Information about the logical switch includes related information of atleast one OFS port among the M OFS ports. If there is no logical switchcorresponding to the conventional IP network, S608 is performed, or ifthere is a logical switch corresponding to the conventional IP network,S609 is performed.

-   -   S608: The controller creates and stores information about the        logical switch.

Link information between the M OFS ports and the logical switch iscreated and stored according to sending directions and receivingdirections of the M OFS ports. Link information of a receiving directionof the fourth port and link information of a sending direction of thethird port are created.

The information about the logical switch includes related information ofthe third port and related information of the fourth port. The relatedinformation of the third port includes link information in a directionfrom the third port to the logical switch, and the related informationof the fourth port includes link information in a direction from thelogical switch to the third port.

-   -   S609: The controller updates information about the logical        switch.

The updated information about the logical switch includes relatedinformation of the M OFS ports.

In an embodiment, it is assumed that the logical switch includes relatedinformation of T OFS ports among the M OFS ports, and for this, thereare cases as follows. When the T OFS ports include the fourth port, andthe related information of the fourth port does not include the linkinformation in the direction from the logical switch to the fourth port,the link information in the direction from the logical switch to thefourth port is created. When the T OFS ports include the third port, andthe related information of the third port does not include the linkinformation in the direction from the third port to the logical switch,the link information in the direction from the third port to the logicalswitch is created, and related information of ports among the M OFSports except the T OFS ports is created and stored. For ports, belongingto the fourth port, of the ports among the M OFS ports except the T OFSports, the link information in the direction from the logical switch tothe fourth port is created, and for ports belonging to the third port,the link information in the direction from the third port to the logicalswitch is created.

In this embodiment, a controller manages a logical switch as a commonswitch of an OPENFLOW network, such that topological learning efficiencyof an OPENFLOW network cross a conventional IP network can be improved,and management by a controller cross a networking scenario in which anOPENFLOW network and a conventional IP network are interconnected can besimplified.

FIG. 7 is a schematic diagram of a third application scenario accordingto the present disclosure. As shown in FIG. 7, a host is connected to aswitch of a conventional IP network. For the scenario shown in FIG. 7, amethod in the present disclosure is shown in FIG. 8. FIG. 8 is aschematic flowchart of an embodiment of a topological learning methodfor an OPENFLOW network cross a conventional IP network according to thepresent disclosure. As shown in FIG. 8, the method of this embodiment isas follows:

-   -   S801: A controller determines that a port that receives messages        from at least two Media Access Control (MAC) addresses is a        fifth port.

When a same OFS port of one switch of the OPENFLOW network receivesmessages from at least two MAC addresses, it indicates that the port isconnected to a switch of the conventional IP network.

-   -   S802: The controller determines that the fifth port, and ports        that correspond to the at least two MAC addresses are ports        connected to a same conventional IP network.    -   S803: The controller creates link information between the ports        connected to the same conventional IP network and a same logical        switch, where the fifth port and the ports corresponding to the        at least two MAC addresses are the ports connected to the same        conventional IP network.

That is, the controller mounts, on a logical switch, the fifth port anda host that corresponds to the at least two MAC addresses.

Using the method shown in FIG. 8, a topological relationship afterlearning in the scenario shown in FIG. 7 is shown in FIG. 9. FIG. 9 is aschematic diagram of a topological learning effect in a third scenarioaccording to the present disclosure.

In the foregoing embodiments, a controller creates a logical switch, andafter creating and storing information about the logical switch, thecontroller manages the logical switch as a common switch of an OPENFLOWnetwork. For example, when the controller calculates a forwarding pathaccording to link information between M OFS ports and the logicalswitch, the logical switch participates in calculation of the forwardingpath as a common OPENFLOW switch does, but does not deliver a flow entryto a logical switch on the forwarding path. The logical switch mayperform forwarding as a first switch, an intermediate-hop switch, or alast switch on the forwarding path according to a location of thelogical switch on the entire forwarding path.

A scenario in which the logical switch is a first-hop switch on theforwarding path is shown in FIG. 10. FIG. 10 is a schematic diagram ofthe scenario in which the logical switch is the first-hop switchaccording to the present disclosure. The controller uses a second-hopswitch on the forwarding path as the first-hop switch and delivers theflow entry to the second-hop switch, and sends the flow entry to aswitch on the forwarding path other than the logical switch. Thecontroller does not deliver the flow entry to the logical switch.

A scenario in which the logical switch is an intermediate-hop switch onthe forwarding path is shown in FIG. 11. FIG. 11 is a schematic diagramof the scenario in which the logical switch is the intermediate-hopswitch according to the present disclosure. The controller sends theflow entry to a switch on the forwarding path other than the logicalswitch.

A scenario in which the logical switch is a last-hop switch on theforwarding path is shown in FIG. 12. FIG. 12 is a schematic diagram ofthe scenario in which the logical switch is the last-hop switchaccording to the present disclosure. The controller uses apenultimate-hop switch on the forwarding path as the last-hop switch,and forwards the flow entry to a switch on the forwarding path otherthan the logical switch.

In conclusion, all the foregoing embodiments of the present disclosurecan bring the following beneficial effects: implementation is simple,and topological learning and management of an OPENFLOW network cross aconventional IP network can be completed without a need of making anymodification on the OPENFLOW Protocol. By creating and managing avirtual logical switch, a controller can simplify management on a linkand topological information. When a forwarding path is calculated, adifference between an OPENFLOW switch and a switch of a conventional IPnetwork is blocked, thereby simplifying calculation of the forwardingpath cross the OPENFLOW network and an IP switch.

It should be noted that in the foregoing embodiments, when there is acase in which multiple newly created logical switches are connected to asame OFS port, the logical switches connected to the same OFS port arecombined to be one logical switch. Generally, according to creationtimes, a logical switch created later is added to a logical switchcreated earlier. In an embodiment, information about the logical switchcreated later is modified, an identifier of the logical switch createdlater is modified to be an identifier of the logical switch createdearlier, a port of the logical switch created later and a port of thelogical switch created earlier are numbered sequentially, and linkinformation of the logical switch created later is copied to informationabout the logical switch created earlier.

FIG. 13 is a schematic structural diagram of an embodiment of atopological learning apparatus for an OPENFLOW network cross aconventional IP network according to the present disclosure. Theapparatus of this embodiment may be deployed on a controller, and theapparatus of this embodiment includes an obtaining module 1301, adetermining module 1302, and a processing module 1303. The obtainingmodule 1301 is configured to obtain M OFS ports connected to a sameconventional IP network, where M is an integer greater than or equal to2, and a switch of the conventional IP network is a non-OPENFLOW switchOFS, the conventional IP network comprises a non-OFS, and theconventional IP network does not comprise an OFS. The determining module1302 is configured to determine whether there is a logical switchcorresponding to the conventional IP network, where information aboutthe logical switch includes related information of at least one OFS portamong the M OFS ports. The processing module 1303 is configured to ifthe controller determines that there is no logical switch correspondingto the conventional IP network, create and store the information aboutthe logical switch, where the information about the logical switchincludes related information of the M OFS ports. Related information ofeach OFS port includes link information in a direction from the port tothe logical switch and/or link information in a direction from thelogical switch to the port.

In this embodiment, the processing module 1303 is further configured toif the determining module determines that there is a logical switchcorresponding to the conventional IP network, update the informationabout the logical switch, where the updated information about thelogical switch includes the related information of the M OFS ports.

In this embodiment, the processing module 1303 is configured to createand store link information between the M OFS ports and the logicalswitch according to sending directions and receiving directions of the MOFS ports.

In this embodiment, the processing module 1303 is configured to controlall OPENFLOW switch OFS ports in the OPENFLOW network to send an LLDPmessage and a BDDP message, where the BDDP message and the LLDP messageeach carry an identifier of a sending port, and the identifier of thesending port can uniquely identify the sending port in the OPENFLOWnetwork, and obtain the M OFS ports connected to the same conventionalIP network according to the identifier of the sending port that iscarried in the BDDP message and the identifier of the sending port thatis carried in the LLDP message, where the M OFS ports include a firstport and M−1 second ports, and the first port receives BDDP messagessent by the second ports but does not receive LLDP messages sent by thesecond ports, or the M−1 second ports receive a BDDP message sent by thefirst port but does not receive an LLDP message sent by the first port.

In this embodiment, the processing module 1303 is configured to enable arouting protocol on a third port connected to an IP router, and store acorrespondence between the third port and an IP address, learn, usingthe routing protocol, routing information of the IP router connected tothe third port, obtain, from the routing information, network segmentinformation of routers connected to the IP router, determine, accordingto the correspondence between the third port and the IP address, afourth port belonging to the network segment information, send a UDPmessage to the fourth port through the third port, where the UDP messageincludes a data path identifier and a port identifier of a switch thatsends the UDP message, and if the fourth port receives the UDP messagesent by the third port, determine that the third port and the fourthport are ports in the M OFS ports connected to the same conventional IPnetwork.

In this embodiment, the processing module 1303 is further configured towhen there is a down port among the M OFS ports, delete link informationbetween the down port and the logical switch, or if all of the M OFSports are down, delete the information about the logical switch.

In this embodiment, the processing module 1303 is further configured tocalculate a forwarding path according to link information between the MOFS ports and the logical switch, and when the logical switch is afirst-hop switch on the forwarding path, use a second-hop switch on theforwarding path as the first-hop switch, and send a flow entry to aswitch on the forwarding path other than the logical switch, or when thelogical switch is an intermediate-hop switch on the forwarding path,send a flow entry to a switch on the forwarding path other than thelogical switch, or when the logical switch is a last-hop switch on theforwarding path, use a penultimate-hop switch on the forwarding path asthe last-hop switch, and forward a flow entry to a switch on theforwarding path other than the logical switch.

According to the apparatus in this embodiment, the obtaining module 1301obtains M OFS ports connected to a same conventional IP network, thedetermining module 1302 determines whether there is a logical switchcorresponding to the conventional IP network, where information aboutthe logical switch includes related information of at least one OFS portamong the M OFS ports, if the determining module 1302 determines thatthere is no logical switch corresponding to the conventional IP network,the processing module 1303 creates and stores the information about thelogical switch, where the information about the logical switch includesrelated information of the M OFS ports, and related information of eachOFS port includes link information in a direction from the port to thelogical switch and/or link information in a direction from the logicalswitch to the port, and the processing module 1303 manages the logicalswitch as a common OPENFLOW switch of an OPENFLOW network. This improvestopological learning efficiency of an OPENFLOW network cross aconventional IP network, and simplifies management by a controller crossa networking scenario in which an OPENFLOW network and a conventional IPnetwork are interconnected.

FIG. 14 is a schematic structural diagram of an embodiment of atopological learning apparatus for an OPENFLOW network cross aconventional IP network according to the present disclosure. Thetopological learning apparatus 1400 for an OPENFLOW network cross aconventional IP network includes a communications interface 1401, amemory 1403, and a processor 1402, where the communications interface1401, the processor 1402, and the memory 1403 are connected with oneanother using a bus 1404. The bus 1404 may be a peripheral componentinterconnect (PCI) bus, an extended industry standard architecture(EISA) bus, or the like. The bus may be classified as an address bus, adata bus, a control bus, or the like. For ease of illustration, the busis represented using only one bold line in FIG. 14, but this does notmean that there is only one bus or one type of bus.

The communications interface 1401 is configured to communicate with atransmit end. The memory 1403 is configured to store a program. In anembodiment, the program may include program code, where the program codeincludes a computer operation instruction. The memory 1403 may include arandom access memory (RAM), or may further include a non-volatilememory, such as at least one magnetic disk storage. The processor 1402executes the program stored in the memory 1403 to implement the methodsin the foregoing method embodiments of the present disclosure, includingobtaining M OFS ports connected to a same conventional IP network, whereM is an integer greater than or equal to 2, and a switch of theconventional IP network is a non-OPENFLOW switch OFS, the conventionalIP network comprises a non-OFS, and the conventional IP network does notcomprise an OFS, determining whether the controller stores informationabout the logical switch, where the information about the logical switchincludes related information of at least one OFS port among the M OFSports, and if the controller does not store the information about thelogical switch, creating and storing the information about the logicalswitch, where the information about the logical switch includes relatedinformation of the M OFS ports, where related information of each OFSport includes link information in a direction from the port to thelogical switch and/or link information in a direction from the logicalswitch to the port.

The processor 1402 may be a general purpose processor, including acentral processing unit (CPU), a network processor (NP), and the like,or may be a digital signal processor (DSP), an application-specificintegrated circuit (ASIC), a field programmable gate array (FPGA), oranother programmable logical device, discrete gate or transistor logicdevice, or discrete hardware assembly.

According to the apparatus in this embodiment, the processor obtains MOFS ports connected to a same conventional IP network, it is determinedwhether there is a logical switch corresponding to the conventional IPnetwork, where information about the logical switch includes relatedinformation of at least one OFS port among the M OFS ports, if there isno logical switch corresponding to the conventional IP network, theinformation about the logical switch is created and stored, where theinformation about the logical switch includes related information of theM OFS ports, and related information of each OFS port includes linkinformation in a direction from the port to the logical switch and/orlink information in a direction from the logical switch to the port, andthe logical switch is managed as a common OPENFLOW switch of an OPENFLOWnetwork. This improves topological learning efficiency of an OPENFLOWnetwork cross a conventional IP network, and simplifies management by acontroller cross a networking scenario in which an OPENFLOW network anda conventional IP network are interconnected.

Persons of ordinary skill in the art may understand that all or some ofthe steps of the method embodiments may be implemented by a programinstructing related hardware. The program may be stored in acomputer-readable storage medium. When the program runs, the steps ofthe method embodiments are performed. The foregoing storage mediumincludes any medium that can store program code, such as a read-onlymemory (ROM), a RAM, a magnetic disk, or an optical disc.

Finally, it should be noted that the foregoing embodiments are merelyintended for describing the technical solutions of the presentdisclosure, but not for limiting the present disclosure. Although thepresent disclosure is described in detail with reference to theforegoing embodiments, persons of ordinary skill in the art shouldunderstand that they may still make modifications to the technicalsolutions described in the foregoing embodiments or make equivalentreplacements to some or all technical features thereof, withoutdeparting from the scope of the technical solutions of the embodimentsof the present disclosure.

What is claimed is:
 1. A topological learning method, comprising:obtaining, by a controller, M OPENFLOW switch (OFS) ports connected to acommon conventional Internet Protocol (IP) network, wherein M is aninteger greater than or equal to 2, wherein the conventional IP networkcomprises a non-OFS, and wherein the conventional IP network does notcomprise an OFS; and storing information about a logical switch whenthere is no logical switch corresponding to the conventional IP network,wherein the information about the logical switch comprises relatedinformation of the M OFS ports, and wherein the related information ofthe M OFS ports is obtained according to the M OFS ports and the commonconventional IP network, and wherein the related information of each ofthe M OFS ports comprises link information between the logical switchand a relative one of the M OFS ports.
 2. The topological learningmethod according to claim 1, further comprising updating the informationabout the logical switch when there is the logical switch correspondingto the common conventional IP network, wherein the updated informationabout the logical switch comprises the related information of the M OFSports.
 3. The topological learning method according to claim 1, whereinstoring the information about the logical switch comprises creating, bythe controller, link information between the M OFS ports and the logicalswitch according to sending directions and receiving directions of the MOFS ports.
 4. The topological learning method according to claim 1,wherein obtaining, by the controller, the M OFS ports connected to thecommon conventional IP network comprises: controlling, by thecontroller, each OFS port in the OPENFLOW network to send an Link LayerDiscovery Protocol (LLDP) message and a Broadcast Domain DiscoveryProtocol (BDDP) message, wherein the BDDP message and the LLDP messageeach carry an identifier of a sending port, and wherein the identifierof the sending port uniquely identifies the sending port in the OPENFLOWnetwork; and obtaining, by the controller, the M OFS ports connected tothe common conventional IP network according to the identifier of thesending port that is carried in the BDDP message and the identifier ofthe sending port that is carried in the LLDP message, wherein the M OFSports comprise a first port and M−1 second ports, wherein the first portreceives BDDP messages sent by the second ports but does not receiveLLDP messages sent by the second ports.
 5. The topological learningmethod according to claim 1, wherein obtaining, by the controller, the MOFS ports connected to the common conventional IP network comprises:controlling, by the controller, each OFS port in the OPENFLOW network tosend an Link Layer Discovery Protocol (LLDP) message and a BroadcastDomain Discovery Protocol (BDDP) message, wherein the BDDP message andthe LLDP message each carry an identifier of a sending port, and whereinthe identifier of the sending port uniquely identifies the sending portin the OPENFLOW network; and obtaining, by the controller, the M OFSports connected to the common conventional IP network according to theidentifier of the sending port that is carried in the BDDP message andthe identifier of the sending port that is carried in the LLDP message,wherein the M OFS ports comprise a first port and M−1 second ports,wherein the M−1 second ports receive a BDDP message sent by the firstport but do not receive an LLDP message sent by the first port.
 6. Thetopological learning method according to claim 1, wherein the obtaining,by the controller, the M OFS ports connected to the common conventionalIP network comprises: enabling, by the controller, a routing protocol ona third port connected to an IP router; storing, by the controller, acorrespondence between the third port and an IP address; learning, bythe controller using the routing protocol, routing information of the IProuter connected to the third port; obtaining, by the controller fromthe routing information, network segment information of routersconnected to the IP router; determining, by the controller according tothe correspondence between the third port and the IP address, a fourthport belonging to the network segment information; sending, by thecontroller, a User Datagram Protocol (UDP) message to the fourth portthrough the third port, wherein the UDP message comprises a data pathidentifier and a port identifier of a switch that sends the UDP message;and determining that the third port and the fourth port are ports in theM OFS ports connected to the common conventional IP network when thecontroller determines that the fourth port receives the UDP message sentby the third port.
 7. The topological learning method according to claim1, wherein after storing, by the controller, the information about thelogical switch, the method further comprises deleting link informationbetween a down port and the logical switch when the controllerdetermines the down port among the M OFS ports.
 8. The topologicallearning method according to claim 7, wherein the method furthercomprises deleting the information about the logical switch when thecontroller determines that all of the M OFS ports are down.
 9. Thetopological learning method according to claim 1, wherein after storing,by the controller, the information about the logical switch, the methodfurther comprises calculating, by the controller, a forwarding pathaccording to link information between the M OFS ports and the logicalswitch.
 10. The topological learning method according to claim 1,wherein the link information comprises link information in a directionfrom one of the M OFS ports to the logical switch and link informationin a direction from the logical switch to the one of the M OFS ports.11. A controller, comprising: a memory configured to store instructions;and a processor coupled to the memory and configured to execute theinstructions to: obtain M OPENFLOW switch (OFS) ports connected to acommon conventional Internet Protocol (IP) network, wherein M is aninteger greater than or equal to 2, wherein the common conventional IPnetwork comprises a non-OFS, and wherein the common conventional IPnetwork does not comprise an OFS; and create information about a logicalswitch when there is no logical switch corresponding to the commonconventional IP network, wherein the information about the logicalswitch comprises related information of the M OFS ports, and wherein therelated information of the M OFS ports is obtained according to the MOFS ports and the common conventional IP network, and the relatedinformation of each of the M OFS ports comprises link informationbetween the logical switch and a relative one of the M OFS ports. 12.The controller according to claim 11, wherein the processor is furtherconfigured to update the information about the logical switch when thereis the logical switch corresponding to the common conventional IPnetwork, and wherein the updated information about the logical switchcomprises the related information of the M OFS ports.
 13. The controlleraccording to claim 11, wherein the processor is configured to createlink information between the M OFS ports and the logical switchaccording to sending directions and receiving directions of the M OFSports.
 14. The controller according to claim 11, wherein the processoris configured to: control each OFS port in the OPENFLOW network to sendan Link Layer Discovery Protocol (LLDP) message and a Broadcast DomainDiscovery Protocol (BDDP) message, wherein the BDDP message and the LLDPmessage each carry an identifier of a sending port, and wherein theidentifier of the sending port uniquely identifies the sending port inthe OPENFLOW network; and obtain the M OFS ports connected to the commonconventional IP network according to the identifier of the sending portthat is carried in the BDDP message and the identifier of the sendingport that is carried in the LLDP message, wherein the M OFS portscomprise a first port and M−1 second ports, wherein the first portreceives BDDP messages sent by the second ports but does not receiveLLDP messages sent by the second ports.
 15. The controller according toclaim 11, wherein the processor is configured to: control each OFS portin the OPENFLOW network to send an Link Layer Discovery Protocol (LLDP)message and a Broadcast Domain Discovery Protocol (BDDP) message,wherein the BDDP message and the LLDP message each carry an identifierof a sending port, and wherein the identifier of the sending portuniquely identifies the sending port in the OPENFLOW network; and obtainthe M OFS ports connected to the common conventional IP networkaccording to the identifier of the sending port that is carried in theBDDP message and the identifier of the sending port that is carried inthe LLDP message, wherein the M OFS ports comprise a first port and M−1second ports, wherein the M−1 second ports receive the BDDP message sentby the first port but do not receive the LLDP message sent by the firstport.
 16. The controller according to claim 11, wherein the processor isconfigured to: enable a routing protocol on a third port connected to anIP router, and storing a correspondence between the third port and an IPaddress; learn using the routing protocol, routing information of the IProuter connected to the third port; obtain from the routing information,network segment information of routers connected to the IP router;determine according to the correspondence between the third port and theIP address, a fourth port belonging to the network segment information;send a User Datagram Protocol (UDP) message to the fourth port throughthe third port, wherein the UDP message comprises a data path identifierand a port identifier of a switch that sends the UDP message; anddetermine that the third port and the fourth port are ports in the M OFSports connected to the common conventional IP network when thecontroller determines that the fourth port receives the UDP message sentby the third port.
 17. The controller according to claim 11, wherein theprocessor is further configured to delete link information between adown port and the logical switch when the processor determines the downport among the M OFS ports.
 18. The controller according to claim 17,wherein the processor is further configured to delete the informationabout the logical switch when the processor determines that all of the MOFS ports are down.
 19. The controller according to claim 11, whereinthe processor is further configured to calculate a forwarding pathaccording to the link information between the M OFS ports and thelogical switch.
 20. The controller according to claim 11, wherein thelink information comprises link information in a direction from one ofthe M OFS ports to the logical switch and link information in adirection from the logical switch to the one of the M OFS ports.